home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / source / sprites / print.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-05  |  819 b   |  64 lines

  1. /*
  2.     print.c
  3.  
  4.     Printing support
  5.  
  6.     For an example we render the text in pFileData
  7.     into the printer DC
  8.  
  9. */
  10.  
  11. #include "global.h"
  12.  
  13. void Print(HDC hDC)
  14. {
  15.     RECT rc;
  16.  
  17.     dprintf2("Print");
  18.  
  19.  
  20.     //
  21.     // Set the bounding rectangle
  22.     //
  23.  
  24.     rc.left = rc.top = 0;
  25.     rc.right = GetDeviceCaps(hDC, HORZRES);
  26.     rc.bottom = GetDeviceCaps(hDC, VERTRES);
  27.  
  28.     //
  29.     // Set up the printer
  30.     //
  31.  
  32.     Escape(hDC, STARTDOC, lstrlen(szAppName), (LPSTR)szAppName, NULL);
  33.  
  34.     //
  35.     // Draw the image in the DC
  36.     //
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.     //
  52.     // Tell the printer it's the end of the page
  53.     //
  54.  
  55.     Escape(hDC, NEWFRAME, 0, NULL, NULL);
  56.  
  57.     //
  58.     // Tell the printer it's the end of the document
  59.     //
  60.  
  61.     Escape(hDC, ENDDOC, 0, NULL, NULL);
  62.  
  63. }
  64.